<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../../../vue.js"></script>
    <script src="../../../vue-router_3.0.2.js"></script>
</head>

<body>
    <div class="box">
        <router-link to='/pppppppp/1'>1</router-link>
        <router-link to='/pppppppp/2'>2</router-link>
        <router-link to='/pppppppp/3'>3</router-link>
        <router-link to='/pppppppp/4'>4</router-link>
        <router-link to='/pppppppp/5'>5</router-link>
        <router-link to='/hhhhhhhh'>hhhhhhhh</router-link>


        <router-View></router-View>

    </div>
    <script>
        const pppppppp = {
            template: `<div>
                        <h1>pppppppp -- {{ $route.params.id }} </h1>
                    </div>`
        }
        const hhhhhhhh = {
            template: `<div>
                        <h1>hhhhhhhh</h1>
                    </div>`
        }

        const router = new VueRouter({
            routes: [{
                path: '/pppppppp/:id',
                component: pppppppp,
                name: pppppppp
            }, {
                path: '/hhhhhhhh',
                component: hhhhhhhh,
                name: hhhhhhhh
            }, ]
        })

        let vm = new Vue({
            el: '.box',
            data: {},
            router
        })
    </script>
</body>

</html>